package com.zhu.tool_test.enginemanager;


import com.eclipsesource.v8.V8;

/**
 * @program: tool_test
 * @description: v8引擎测试
 * @author: ggBall
 * @create: 2021-01-15 18:00
 **/
public class V8Test {

    public static void main(String[] args) {
        V8 runtime = V8.createV8Runtime();
        int result = runtime.executeIntegerScript(""
                + "var hello = 'hello, ';\n"
                + "var world = 'world!';\n"
                + "hello.concat(world).length;\n");
        System.out.println(result);
        runtime.release();
    }


}
